home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 27 / CU Amiga Magazine's Super CD-ROM 27 (1998)(EMAP Images)(GB)[!][issue 1998-10].iso / CUCD / Programming / JForth / JTools / JARexx / tests / TestRVI.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1991-12-07  |  774 b   |  29 lines

  1. /* Tests the direct variable interface    */
  2. /* Include JRX:VarTest.f and run it before this. */
  3.  
  4. a.1 = "Just a test."
  5. a.2 = "Hello There!"
  6.  
  7. /* send a command to the VarTest host */
  8. say 'Before command status='status 'a.1='a.1 'a.2='a.2
  9. address 'VarTest' 'The first command'
  10. say 'After  command status='status 'a.1='a.1 'a.2='a.2
  11. say
  12.  
  13. say "Before TestMem =" storage()
  14. call TestMem
  15. say "After  TestMem =" storage()
  16.  
  17. /* send the 'CLOSE' command' */
  18. address 'VarTest' close
  19. exit
  20.  
  21. /* Test for memory usage ----------------------------- */
  22. /* Variable are local to procedures unless exposed. */
  23. TestMem: procedure expose a.2
  24. do for 2
  25.    address 'VarTest' 'Test command'
  26.     a.1 = "Local to Testmem"   /* change after first call in proc */
  27.    say "Inside testMem =" storage()
  28.    end
  29.